package com.example.demo.exception;

public enum CodeEnum {
    SUCCESS("10000","操作成功"),
    ERROR("20000","操作失败"),
    IDENTIFICATION_ERROR("20001","身份异常"),
    DATA_ERROR("20002","业务错误"),
    PARAM_ERROR("20003","参数错误"),
    EMAIL_ERROR("20004","邮箱格式错误"),
    ADMIN_ERROR("20005","不能修改管理员信息!"),
    INVALID_USERNAME_PASSWORD("20006","用户名或密码错误"),
    INVALID_RE_PASSWORD("20007","两次输入密码不一致"),
    INVALID_USER("20008","用户不存在"),
    INVALID_USER_EXIST("20009","用户已存在"),
    INVALID_ROLE("20010","角色不存在"),
    USER_NO_PERMITION("20011","当前用户无该接口权限"),
    VERIFY_PARAM_ERROR("20012","校验码错误"),
    VERIFY_PARAM_PASS("20013","校验码过期"),
    MOBILE_ERROR("20014","手机号格式错误"),
    UPDATE_ROLEINFO_ERROR("20015","更新角色信息失败"),
    USER_NOT_LOGIN("20016","用户未登录"),
    NULL_ORDER_ITEM("20017","空订单项"),
    NOT_EXIST_ORDER("20018","订单不存在"),
    UNPAID_ORDER("20019","订单未付款"),
    UNDELIVERED_ORDER("20020","订单未发货"),
    FINISHED_ORDER("20021","订单已完成，不要重复确认完成"),
    DELIVERED_ORDER("20022","订单已发货，不要重复确认发货"),
    ORDER_STATE_ERROR("20023","订单状态错误，联系管理员修改"),
    NULL_PARAM("20024","传入参数为空"),
    ORDER_DELETED("20025","订单已被删除"),
    INSUFFICIENT_BALANCE("20026","余额不足"),
    PAID_ORDER("20027","订单已付款，不要重复付款"),
    NOT_EXIST_CART("20028","购物车不存在");
    private String respCode;
    private String respMsg;


    CodeEnum(String respCode, String respMsg){
        this.respCode = respCode;
        this.respMsg=respMsg;
    }

    public String getCode() {
        return respCode;
    }
    public String getMsg() {
        return respMsg;
    }
}
